package com.ruoyi.order.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 订单对象 orders
 *
 * @author ruoyi
 * @date 2022-04-21
 */
public class Orders extends BaseEntity implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String number;

    /** 订单状态 1待付款，2待派送，3已派送，4已完成，5已取消 */
    @Excel(name = "订单状态 1待付款，2待派送，3已派送，4已完成，5已取消")
    private Long status;

    /** 下单用户 */
    private Long userId;

    /** 地址id */
    private Long addressBookId;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime orderTime;

    /** 结账时间 */
    private LocalDateTime checkoutTime;

    /** 支付方式 1微信,2支付宝 */
    private Long payMethod;

    /** 实收金额 */
    @Excel(name = "实收金额")
    private BigDecimal amount;

    /** 手机 */
    @Excel(name = "手机")
    private String phone;

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    /** 用户名 */
    @Excel(name = "用户名")
    private String userName;

    /** 收货人 */
    private String consignee;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setNumber(String number)
    {
        this.number = number;
    }

    public String getNumber()
    {
        return number;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setAddressBookId(Long addressBookId)
    {
        this.addressBookId = addressBookId;
    }

    public Long getAddressBookId()
    {
        return addressBookId;
    }
    public void setOrderTime(LocalDateTime orderTime)
    {
        this.orderTime = orderTime;
    }

    public LocalDateTime getOrderTime()
    {
        return orderTime;
    }
    public void setCheckoutTime(LocalDateTime checkoutTime)
    {
        this.checkoutTime = checkoutTime;
    }

    public LocalDateTime getCheckoutTime()
    {
        return checkoutTime;
    }
    public void setPayMethod(Long payMethod)
    {
        this.payMethod = payMethod;
    }

    public Long getPayMethod()
    {
        return payMethod;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }
    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getAddress()
    {
        return address;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setConsignee(String consignee)
    {
        this.consignee = consignee;
    }

    public String getConsignee()
    {
        return consignee;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("number", getNumber())
            .append("status", getStatus())
            .append("userId", getUserId())
            .append("addressBookId", getAddressBookId())
            .append("orderTime", getOrderTime())
            .append("checkoutTime", getCheckoutTime())
            .append("payMethod", getPayMethod())
            .append("amount", getAmount())
            .append("remark", getRemark())
            .append("phone", getPhone())
            .append("address", getAddress())
            .append("userName", getUserName())
            .append("consignee", getConsignee())
            .toString();
    }
}
